{template header}

<div class="midder">
<div class="mc">

<div class="bbox mh400">

{template set_menu}
<div class="bc">
<div class="tags">
{loop $arrTag $key $item}
<a>{$item[tagname]}</a>
{/loop}

<a  href="javascript:void('0');" onclick="showTagFrom()">+添加个人标签</a>
</div>

<div class="clear"></div>

<div id="tagFrom" style="display:none">
<input style="width:250px;padding:3px 2px;" type="text" name="tags" id="tags" /> <button type="submit" class="btn" onClick="savaTag({$userid})">添加</button> <a href="javascript:void(0);" onClick="showTagFrom()">取消</a>
</div>
</div>
</div>


</div>
</div>
<script>

/*显示标签界面*/
function showTagFrom(){	$('#tagFrom').toggle('fast');}
/*提交标签*/
function savaTag(userid)
{
	var tag = $('#tags').val();
		if(tag ==''){ alert('请输入标签哟^_^');$('#tagFrom').show('fast');}else{
			var url = siteUrl+'index.php?app=tag&ac=add_ajax&ts=do';
			$.post(url,{objname:'user',idname:'userid',tags:tag,objid:userid},function(rs){  window.location.reload()   })
		}
	
}
</script>
{template footer}